package top.honlnk.czuan.mapper;

import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import top.honlnk.czuan.pojo.dto.PageGetUserDTO;
import top.honlnk.czuan.pojo.entity.User;

@Mapper
public interface UserMapper {

    void addUser(User user);

    @Select("select * from users where account = #{account}")
    User getUserByAccount(String account);

    Page<User> getUser(PageGetUserDTO pageGetUserDTO);

    @Select("select * from users where id = #{id}")
    User getUserById(Integer id);
}
